import Vue from 'vue'
import App from './App'
import uView from 'uview-ui'
// 引入全局样式
import './static/css/commen.css'
import './static/css/uview-reset.css'

import { utils } from './utils/utils'
import { router, RouterMount } from './router/index'

import * as custom from './utils/filter'

import store from '@/store'

Vue.config.productionTip = false
Vue.prototype.$utils = utils

App.mpType = 'app'

Object.keys(custom).forEach(key => {
  Vue.filter(key, custom[key])
})

Vue.use(uView)
Vue.use(router)

const app = new Vue({
  ...App,
  store
})

// #ifdef H5
RouterMount(app, router, '#app')
// #endif

// #ifndef H5
app.$mount() // 为了兼容小程序及app端必须这样写才有效果
// #endif
